<div class="btn-group">
    <button type="button" class="btn btn-default visible-xs" id="search_button" data-toggle="dropdown">
    Search <span class="caret"></span>
  </button>
<div id="search" class="dropdown-menu" role="menu">
<?php echo $this->Form->create('Page', array('url' => array('controller' => 'posts', 'action' => 'search'), 'class'=>'navbar-form form-inline')); ?>

       
                <div class="form-group">
                        <label>Search:</label>
                        <input name="data[Product][q]" type="text" placeholder="search keyword..." class="form-control" id="search-bar">
                </div>
                <div id="category">
                        <label>In</label>


                       <?php echo $this->Form->input('parent_id', array('div'=>false,'name'=>'data[Product][category_id]','label' => false, 'class'=>'form-control')); ?>
                </div>
                <div id="location">
                        <label>Location</label>
                       <?php echo $this->Form->input('location_id', array('div'=>false, 'class'=>'form-control','label' => false, 'name'=>'data[Product][location]')); ?>
                </div>
                <div id="filter">
                        <select class="form-control" name="data[Product][filter]">
                                <option value="asc">-Short/Filter</option>
                                <option value="asc">A-Z</option>
                                <option value="desc">Z-A</option>
                        </select>
                </div>
                <button class="btn search-button" type="submit"><span></span>Search</button>
        </form>
</div>
</div>